public class Test {
    //二叉树的基本操作
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createNode();
        binaryTree.preOrder(root);

        System.out.println();
        binaryTree.inOrder(root);

        System.out.println();
        binaryTree.postOrder(root);
        System.out.println();
        System.out.print("树的节点个数：");
        System.out.println(binaryTree.size(root));
        //binaryTree.size1(root);
        //System.out.println(BinaryTree.nodeSize);

        System.out.print("叶子节点个数：");
        System.out.println(binaryTree.getLeafNodeCount(root));
        //binaryTree.getLeafNodeCount1(root);
        //System.out.println(binaryTree.leafSize);

        System.out.print("第K层的节点个数：");
        int ret = binaryTree.getKLeaveNodeCount(root, 3);
        System.out.println(ret);

        System.out.print("二叉树的高度：");
        int height = binaryTree.getHeight(root);
        System.out.println(height);

        System.out.print("查找某个值：");
        BinaryTree.TreeNode ret1 = binaryTree.find(root, 'E');
        System.out.println(ret1.val);

        System.out.print("层序遍历：");
        binaryTree.levelOrder(root);

        System.out.println("是否是满二叉树");
        System.out.println(binaryTree.isCompleteTree(root));
    }

}
